/**
 * Created by ls.c on 2016/11/3.
 */

export const START_LOADING = 'START_LOADING'
export const FINISH_LOADING = 'FINISH_LOADING'
export const FETCH_ADMIN_BREADCRUMB = 'FETCH_ADMIN_BREADCRUMB'
export const FETCH_ADMIN_NAV_STATUS = 'FETCH_ADMIN_NAV_STATUS'

export const FETCH_ROLE_SUCCESS = 'FETCH_ROLE_SUCCESS'
export const FETCH_INDUSTRY_SUCCESS = 'FETCH_INDUSTRY_SUCCESS'
export const FETCH_SALESMAN_SUCCESS = 'FETCH_SALESMAN_SUCCESS'
export const FETCH_CUSTOMERS_SUCCESS = 'FETCH_CUSTOMERS_SUCCESS'
export const FETCH_CARD_TRANSFER_SUCCESS = 'FETCH_CARD_TRANSFER_SUCCESS'
export const FETCH_BASICS_PACKAGE_SUCCESS = 'FETCH_BASICS_PACKAGE_SUCCESS'
export const FETCH_OVERLYING_PACKAGE_SUCCESS = 'FETCH_OVERLYING_PACKAGE_SUCCESS'
export const FETCH_PACKAGE_TYPE_SUCCESS = 'FETCH_PACKAGE_TYPE_SUCCESS'
export const FETCH_PACKAGE_LIST_SUCCESS = 'FETCH_PACKAGE_LIST_SUCCESS'


const mutations = {

	// 开始加载动画
	[START_LOADING] (state) {
		state.loading = true
	},
	// 结束加载动画
	[FINISH_LOADING] (state) {
		state.loading = false
	},
	// 获取面包屑
	[FETCH_ADMIN_BREADCRUMB] (state, names) {
		state.breadcrumb = names
	},
	// 获取导航栏状态
	[FETCH_ADMIN_NAV_STATUS] (state, status) {
		state.adminNavStatus = status
	},

	// 获取角色
	[FETCH_ROLE_SUCCESS] (state, data) {
		state.roleInfo = data
	},
	// 获取基础套餐
	[FETCH_BASICS_PACKAGE_SUCCESS] (state, data) {
		state.basicsPackage = data
	},
	// 获取叠加包套餐
	[FETCH_OVERLYING_PACKAGE_SUCCESS] (state, data) {
		state.overlyingPackage = data
	},
	// 获取行业列表
	[FETCH_INDUSTRY_SUCCESS] (state, data) {
		state.industry = data
	},
	// 获取业务员
	[FETCH_SALESMAN_SUCCESS] (state, data) {
		state.salesman = data
	},
	// 获取客户
	[FETCH_CUSTOMERS_SUCCESS] (state, data) {
		state.customers = data
	},
	// 获取卡划拨信息
	[FETCH_CARD_TRANSFER_SUCCESS] (state, data) {
		state.transfer = data
	},
	// 获取套餐类型
	[FETCH_PACKAGE_TYPE_SUCCESS] (state, data) {
		state.packageType = data
	},
	// 获取套餐列表
	[FETCH_PACKAGE_LIST_SUCCESS] (state, data) {
		state.packageList = data
	}
}

export default mutations